package di;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;


@Configuration
@ComponentScan("di")
public class Config {

    @Bean
    //@Scope("prototype")
    public SnakeLance lance(){
        return new SnakeLance();
    }

    @Bean
    public ZhangFei fei(SnakeLance lance){
        ZhangFei zf=new ZhangFei();
        zf.setSnakeLance(lance);
        return zf;
    }



}
